package com.example.test.bottom_tab;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.example.test.Admin_function.add_test;
import com.example.test.R;
import com.example.test.login.login_main_activity;


public class main_Fragment extends Fragment {
    private String content;
    private Button bt;

    public main_Fragment(String content,Button bt) {
        this.content = content;
        this.bt = bt;
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fg_content_main,container,false);
        TextView txt_content = (TextView) view.findViewById(R.id.txt_content);
        Button bt = (Button) view.findViewById(R.id.main_back);
        txt_content.setText(content);

        bt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent test_add = new Intent(getActivity(), login_main_activity.class);
                startActivity(test_add);
            }
        });
        return view;
    }

}
